const pkg = require("./package.json")
const { writeFileSync } = require("fs")


/* 从project.config.json中读取用户配置的命令名称 */
const { cmdName } = require("./project.config.json")

/* 覆盖package.json中的两处位置 */
pkg.bin = {
    [cmdName]: "./bin/www"
}

pkg.scripts.postinstall = `${cmdName} config set`

writeFileSync("./package.json",JSON.stringify(pkg))
